namespace Wips.Domain.Models.Authorities.Model
{
    /// <summary>
    /// 操作
    /// </summary>
    [Table("AuthorityOperations")]
    [SugarTable("AuthorityOperations", "操作")]
    public class Operation : EntityBase, IAggregateRoot
    {
        /// <summary>
        /// 所属菜单Id
        /// </summary>
        /// <value></value>
        [MaxLength(36)]
        public string MenuId { get; set; }

        /// <summary>
        /// 所属菜单
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.OneToOne, nameof(MenuId))]
        public Menu Menu { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        /// <value></value>
        [Required]
        [MaxLength(12)]
        public string Name { get; set; }

        /// <summary>
        /// 操作编码,分号隔开
        /// </summary>
        /// <value></value>
        [SqlSugar.SugarColumn(ColumnDataType="varchar(max)")]
        public string Code { get; set; }


        /// <summary>
        /// 排序字段
        /// </summary>
        /// <value></value>
        public int Sort { get; set; }


        /// <summary>
        /// 最后更新人Id
        /// </summary>
        public string? LastUpdatedUserId { get; set; }
    }
}